package cn.zhouchao.system.domain;

import cn.zhouchao.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.ArrayList;
import java.util.List;

/**
 * 菜单权限
 *
 * @author zhouchao
 * @since 2023-03-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Menu extends BaseDomain{

    private String name;
    private String component;
    private String url;
    private String icon;
    private Integer index;
    private Long parentId;
    private String intro;
    private Boolean state;
    //
    private Menu parent;

    //用于无限极树
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//不为空
    private List<Menu> children = new ArrayList<>();//装自己的子部门

}
